package com.habdqn.mybatis.demo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * 用户表(User)实体类
 *
 * @author makejava
 * @since 2019-10-23 14:35:17
 */
@Data
@NoArgsConstructor
public class User implements Serializable {
    /**
     * 用户编号
     */
    private Integer id;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 员工姓名
     */
    private String name;
    /**
     * 性别 0-男,1-女
     */
    private Byte gender;
    /**
     * 生日
     */
    private LocalDate birthday;
    /**
     * 身份权限 0-普通用户,1-管理员
     */
    private Byte isAdmin;
    /**
     * 电话号码
     */
    private String mobile;
    /**
     * 部门编号
     */
    private Integer departmentId;
    /**
     * 关联部门
     */
    private Department department;

    public User(Integer id, String username, String password, String name, Byte gender, LocalDate birthday,
                Byte isAdmin, String mobile, Integer departmentId) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.name = name;
        this.gender = gender;
        this.birthday = birthday;
        this.isAdmin = isAdmin;
        this.mobile = mobile;
        this.departmentId = departmentId;
    }
}